<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>anchor</title>
</head>

<body>
    <a href="#section1" id="aTag">锚点</a>
    <h2 id="section1" style="margin-top:20px">锚点内容</h2>
    <p>第一节内容</p>
<script>
    function jumpAnchor() {
        document.getElementById('aTag').click();
        console.log('1111');
    }
</script>
</body>
</html>